﻿@model OnlineExam.Entities.Post

@{
    ViewBag.Title = "Details";
}

<h2>Details</h2>

<fieldset>
    <legend>Post</legend>

    <div class="display-label">Title</div>
    <div class="display-field">@Model.Title</div>

    <div class="display-label">Clicks</div>
    <div class="display-field">@Model.Clicks</div>

    <div class="display-label">Body</div>
    <div class="display-field">@Model.Body</div>

    <div class="display-label">Status</div>
    <div class="display-field">@Model.Status</div>

    <div class="display-label">CreatedAt</div>
    <div class="display-field">@String.Format("{0:g}", Model.CreatedAt)</div>

    <div class="display-label">UpdatedAt</div>
    <div class="display-field">@String.Format("{0:g}", Model.UpdatedAt)</div>

    <div class="display-label">Category</div>
    <div class="display-field">@(Model.Category == null ? "None" : Model.Category.Name)</div>

    <div class="display-label">PostMetas</div>
    <div class="display-field">@(Model.PostMetas == null ? "None" : Model.PostMetas.Count.ToString())</div>

    <div class="display-label">User</div>
    <div class="display-field">@(Model.User == null ? "None" : Model.User.Name)</div>
</fieldset>
<p>
    @Html.ActionLink("Edit", "Edit", new { id=Model.ID }) |
    @Html.ActionLink("Back to List", "Index")
</p>


